// 导入封装的request.js
import request from '@/utils/request'

// 列表接口-全部
export const getAllRoleListApi = () => {
  return request({
    url: '/sys_role/allData',
    method: 'get'
  })
}

// 列表接口-分页
export const getRoleListApi = (params) => {
  return request({
    url: '/sys_role/list',
    method: 'get',
    params
  })
}
// 新增
export const addRoleApi = (data) => {
  return request({
    url: '/sys_role/add',
    method: 'post',
    data
  })
}
// 新增
export const editRoleApi = (data) => {
  return request({
    url: '/sys_role/update',
    method: 'post',
    data
  })
}

// 查询单个
export const getRoleInfoApi = (id) => {
  return request({
    url: '/sys_role/rowInfo?id=' + id,
    method: 'get'
  })
}
